<template>
  <view class="my-manor-show">
    <view class="edit-wrap cbox">
      <view class="title rbox box_y_center box_space_b">
        <text class="name">我的庄园</text>
        <text class="btn-edit">编辑</text>
      </view>

      <view class="list cbox">
        <view class="item rbox" v-for="(item, idx) in list" :key="idx">
          <text class="tit rbox box_x_start">{{ item.tit }}</text>
          <text class="msg">{{ item.msg }}</text>
        </view>
      </view>
    </view>

    <view
      class="single-btn btn-normal rbox box_center btn-position"
      @tap="goPage('myManor')"
    >
      确认信息
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          tit: '庄园信息：',
          msg: '第三农庄葡萄庄'
        },
        {
          tit: '园区面积：',
          msg: '10平方千米'
        },
        {
          tit: '发生过的灾害：',
          msg: '霜霉病毒'
        },
        {
          tit: '葡萄品种：',
          msg: '红葡萄'
        },
        {
          tit: '用药次数：',
          msg: '2次'
        },
        {
          tit: '手机号码：',
          msg: '17612345678'
        }
      ]
    }
  },
  methods: {
    goPage(url) {
      if (url) {
        wx.navigateTo({
          url: `/pages/${url}/${url}`
        })
      }
    },
  }
}
</script>

<style lang="scss" scoped>
.my-manor-show {
  padding: 40rpx 42rpx 0;
  min-height: 100vh;
  background-color: #f7f7f7;
  .edit-wrap {
    padding: 0 10rpx 66rpx;
    background: #ffffff;
    box-shadow: 0px 0px 6rpx rgba(0, 0, 0, 0.16);
    border-radius: 30rpx;
    .title {
      padding: 28rpx 30rpx;
      border-bottom: 1rpx solid #e9e8e8;
      .name {
        font-size: 34rpx;
        line-height: 1;
        color: #5a5a5a;
      }
      .btn-edit {
        font-size: 24rpx;
        line-height: 1;
        color: #999;
      }
    }
    .list {
      padding: 30rpx 34rpx 0;
      border-top: 1rpx solid #e9e8e8;
      .item {
        &:not(:first-child) {
          margin-top: 30rpx;
        }
        .tit {
          min-width: 7em;
          font-size: 26rpx;
          line-height: 1;
          color: #b5b5b5;
        }
        .msg {
          margin-left: 16rpx;
          font-size: 26rpx;
          line-height: 1.4;
          color: #5a5a5a;
        }
      }
    }
  }
}
</style>